package com.linewell.pojo;

import org.springframework.data.annotation.Id;
import org.springframework.data.mongodb.core.mapping.Document;
import org.springframework.data.mongodb.core.mapping.Field;

import javax.validation.constraints.Pattern;
import java.util.Date;
@Document(collection = "UserInfo")
public class UserInfo {
    /**
     * 用户id表示
     */
    @Id
    private String userId;
    /**
     * 登录账户
     */
    @Pattern(regexp = "(^[a-zA-Z0-9_-]{6,16}$)|([\u2E80-\u9FFF]{2,5})"
            ,message="用户名必须的6-16位的数字字母组合或2-5位中文")
    @Field("punsterName")
    private String punsterName;
    /**
     * 密码
     */
    @Field("password")
    private String password;
    /**
     * 昵称
     */
    @Field("nickName")
    private String nickName;
    /**
     * 性别
     */
    @Field("sex")
    private String sex;
    /**
     * 头像
     */
    @Field("picture")
    private String picture;
    /**
     * 关注数
     */
    @Field("focusNum")
    private int focusNum;
    /**
     * 粉丝数
     */
    @Field("fansNum")
    private int fansNum;
    /**
     * 出生日期
     */
    @Field("birthday")
    private Date birthday;
    /**
     * 电子邮箱
     */
    @Field("email")
    private String email;
    /**
     * 个人简介
     */
    @Field("myEvaluation")
    private String myEvaluation;
    /**
     *  0为正常  1为封号
     */
    @Field("state")
    private int state;
    /**
     * 权限等级， 0为用户，1为审核人员，2为管理员
     */
    @Field("type")
    private int type;

    public String getUserId() {
        return userId;
    }

    public void setUserId(String userId) {
        this.userId = userId;
    }

    public String getPunsterName() {
        return punsterName;
    }

    public void setPunsterName(String punsterName) {
        this.punsterName = punsterName;
    }

    public String getPassword() {
        return password;
    }

    public void setPassword(String password) {
        this.password = password;
    }

    public String getNickName() {
        return nickName;
    }

    public void setNickName(String nickName) {
        this.nickName = nickName;
    }

    public String getSex() {
        return sex;
    }

    public void setSex(String sex) {
        this.sex = sex;
    }

    public String getPicture() {
        return picture;
    }

    public void setPicture(String picture) {
        this.picture = picture;
    }

    public int getFocusNum() {
        return focusNum;
    }

    public void setFocusNum(int focusNum) {
        this.focusNum = focusNum;
    }

    public int getFansNum() {
        return fansNum;
    }

    public void setFansNum(int fansNum) {
        this.fansNum = fansNum;
    }

    public Date getBirthday() {
        return birthday;
    }

    public void setBirthday(Date birthday) {
        this.birthday = birthday;
    }

    public String getEmail() {
        return email;
    }

    public void setEmail(String email) {
        this.email = email;
    }

    public String getMyEvaluation() {
        return myEvaluation;
    }

    public void setMyEvaluation(String myEvaluation) {
        this.myEvaluation = myEvaluation;
    }

    public int getState() {
        return state;
    }

    public void setState(int state) {
        this.state = state;
    }

    public int getType() {
        return type;
    }

    public void setType(int type) {
        this.type = type;
    }
}